
import pandas as pd
import os

from kitool.DateKit import get_datestr


def read_excel(path, name):
    full_read_path = os.path.join(path, get_datestr(), f'{get_datestr()}__{name}.xlsx')
    return pd.read_excel(full_read_path)


def write_excel(df, out_path, out_name):
    full_out_excel = os.path.join(out_path, get_datestr(), f'{get_datestr()}__{out_name}.xlsx')
    print(full_out_excel)
    df.to_excel(full_out_excel, index=False, engine='openpyxl')